﻿@using HelloMinasan.Web.Song.ViewModels
@using System.Web.Script.Serialization

@model WrapCommentModels
<script src="@Url.Content("~/Content/Js/Comments.js")"></script>

@Html.HiddenFor(x => x.SongId)
@Html.Hidden("songId", Model.SongId)
@Html.HiddenFor(x => x.CurrentPageNumber)
@Html.HiddenFor(x => x.TotalPageCount)

@foreach (var item in Model.Comments)
{
    <div class='commentDivContainer'>
        <img class='smallAvatarComment' src="@Url.Content("~/" + item.OwnerAccount.Avatar)" title="@item.OwnerAccount.FullName - @item.OwnerAccount.UserName"/>
        <div class='contentComment'>
            <div><strong>Date: @item.LastUpdate</strong></div>
            @item.CommentContent
        </div>
    </div>
}

@for (int i = 1; i <= Model.TotalPageCount; i++)
{
    <input type="submit" value="@i" name="currentPage" />  
}

<div align="right">
    <div class="titleSection">
        <span class="titleTab">Leave a comment </span>
        <img src="@Url.Content("~/Content/Images/writecomment.png")" width="20" height="20"/>
    </div>
</div>

@Html.TextArea("newComment", new { @class = "textAreaComment" })
<input type="submit" value="Reply" name="currentPage" class="postCommentButton" />